package Exercise;
//将字符串反转
public class String_1 {
    public static void main(String[] args) {
        String sr = "abcd";
        String re = Reverser(sr);
        System.out.println(re);
    }
    //反转，拼接
    public static String Reverser(String sr){
        String result = "";
        for (int i = sr.length()-1; i >= 0; i--) {
            result = result + sr.charAt(i);
        }
        return  result;
    }
}
